from django.contrib.auth.models import User
from django.db import IntegrityError
import os
import django

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'deep_test.settings')
django.setup()

try:
    User.objects.create_superuser('admin', 'admin@example.com', 'adminpassword')
    print("Superuser created successfully!")
except IntegrityError:
    print("Superuser already exists.")